package jiegou.adapter.demo1;

/**
 * Description：TODO
 * Author：zwenzhi
 * Date：2023/11/24 15:40
 */
public class MusicMediaPlayer implements MediaPlayer{
    @Override
    public void play(String type, String name) {
        if("mp3".equalsIgnoreCase(type)){
            System.out.println("播放类型:"+type+", 播放文件:"+name);
        }else if("vlc".equalsIgnoreCase(type)){
            VlcPlayer vlcPlayer = new VlcPlayer();
            vlcPlayer.playVlc(type,name);
        }else if("mp4".equalsIgnoreCase(type)){
            Mp4Player mp4Player = new Mp4Player();
            mp4Player.playMp4(type,name);
        }else {
            System.out.println("无法解析该文件类型:"+type);
        }
    }
}
